import { createRouter, createWebHashHistory } from "vue-router"
//一级
import Stu from "../views/stu/Stu.vue"
import Tea from "../views/tea/Tea.vue"
import Adm from "../views/adm/Adm.vue"
import Login from "../views/Login.vue"
//管理员【2级】
import Adm_clz from "../views/adm/Clz.vue"
import Adm_course from "../views/adm/Course.vue"
import Adm_task from "../views/adm/Task.vue"
import Adm_stuShow from "../views/adm/stu/Show.vue"
import Adm_stuAdd from "../views/adm/stu/Add.vue"
import Adm_teaShow from "../views/adm/tea/Show.vue"
import Adm_teaAdd from "../views/adm/tea/Add.vue"
import Adm_head from "../views/adm/Head.vue"
//学生端
import Stu_course from "../views/stu/Course.vue"
import Stu_main from "../views/stu/Main.vue"
import Stu_mark from "../views/stu/Mark.vue"
import Stu_pwd from "../views/tea/Pwd.vue"
import Stu_head from "../views/tea/Head.vue"
//教师端
import Tea_doMark from "../views/tea/DoMark.vue"
import Tea_goMark from "../views/tea/GoMark.vue"
import Tea_main from "../views/tea/Main.vue"
import Tea_pwd from "../views/tea/Pwd.vue"
import Tea_head from "../views/tea/Head.vue"
//公共


const routes = [
	{//教师端
		path :"/tea",
		component :Tea,
		children:[
			{
			path :"doMark",component :Tea_doMark,},
			{
			path :"goMark",component :Tea_goMark,},
			{
			path :"main",component :Tea_main,},
			{
			path :"pwd",component :Tea_pwd,},
			{
			path :"head",component :Tea_head,},
		]
	},
	{//学生端
		path :"/stu",
		component :Stu,
		children :[
			{
			path :"course",component :Stu_course,},
			{
			path :"main",component :Stu_main},
			{
			path :"mark",component :Stu_mark},
			{
			path :"pwd",component :Tea_pwd,},
			{
			path :"head",component :Tea_head,},
		]
	},
	{//管理员
		path:"/adm",
		component:Adm,
		children:[
			{//班级
			path:"clz",component:Adm_clz,},
			{//课程
			path :"course",component :Adm_course,},
			{//排课
			path :"task",component :Adm_task,},
			{//学生显示
			path :"stuShow",component :Adm_stuShow,},
			{//学生功能
			path :"stuAdd",component :Adm_stuAdd,},
			{//教师显示
			path :"teaShow",component :Adm_teaShow,},
			{//教师功能
			path :"teaAdd",component :Adm_teaAdd,},
			{//头像
			path :"head",component :Adm_head},
		]
	},
	{//登录
	path:"/login",component:Login,}
]

// 注册路由表 告诉 Vue-router 路由数组
const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes
})

// export 暴露出来 为 import
export default router